package com.hiss.basic.starter.core.utils.tree;

import java.util.List;

/**
 * 树形结构
 */
public interface TreeNode<T, W> {

    T getId();

    void setId(T id);

    T getParentId();

    void setParentId(T parentId);

    default W getWeight() {
        return null;
    }

    default void setWeight(W weight) {
    }

    List<TreeNode<T, W>> getChildren();

    void setChildren(List<TreeNode<T, W>> children);
}
